///////////////////////////////////////////////////////////////////////////
//
// Spring Engine Source File.
// Copyright (C), Dengtao 2011-2021
// ----------------------------------------------------------------------
// File name:   SfRefObject.inl
// Version:     v1.0.0
// Created:     2013/06/15 21:50 by dengtao
// Compilers:   Visual Studio 2008
// Description: 
// ----------------------------------------------------------------------
// History:
//
///////////////////////////////////////////////////////////////////////////

//
//Summary:
//	Increment reference count.
inline void RefObject::IncRefCount()
{
	++m_RefCount;
}

//
//Summary:
//	decrement reference.
inline void RefObject::Release()
{
	--m_RefCount;

	SfAssert(m_RefCount >= 0);

	if (m_RefCount <= 0)
	{
		DeleteThis();
	}
}
